package com.jreque.queue;

import java.util.*;
import java.lang.*;

/**
 * Executes task by calling specified method in new instance of specified object.
 */
public class TaskInvocationByObjectMethod implements ITaskInvocation {

    /**
     * Descriptor of the class & method to use during invocation
     */
    private ObjectMethodDescriptor descriptor;
    /**
     * @param method 
     * @param object 
     */
    public TaskInvocationByObjectMethod(String object, String method) {
        descriptor = new ObjectMethodDescriptor(object, method);
    }

    /**
     * Invokes task execution.
     * @param arguments List of arguments to be passed to execution invocation.
     */
    public void invoke(ArrayList arguments) {
        descriptor.invoke(arguments);
    }
}

